<{include file="public_html/header.html"}>
<{include file="public_html/left_menu.html"}>
<blockquote class="layui-elem-quote"><{$action}></blockquote>
<fieldset class="layui-elem-field">
	<legend>按条件搜索</legend>
	<div class="layui-field-box">
		<form class="layui-form layui-form-pane1" method="post" action="">
			<div class="layui-form-item">
				<div class="layui-input-inline">
						<select name="school_id" placeholder="请选择">
							<option value="all">网校</option>
							<{foreach from=$schools item=item}>
								<option value="<{$item.id}>" <{if $conditions['school_id'] eq $item.id}>selected="selected"<{/if}>><{$item.school_name}></option>
							<{/foreach}>
						</select>
					</div>
		    	<div class="layui-inline">
		    		<input type="text" name="name" placeholder="课件名称" value="<{if !empty($conditions.name)}><{$conditions.name}><{/if}>" class="layui-input">
		    	</div>
		    	<div class="layui-inline">
		    		<button type="submit" class="layui-btn">搜索</button>
		    	</div>
	    	</div>
		</form>
	</div>
</fieldset>

<form class="layui-form layui-form-pane1" method="post" delete_action="/courseware/delete">
	<table class="layui-table" lay-even lay-skin="row">
		<thead>
		  	<tr>
			  	<th>网校</th>
			  	<th>班级</th>
			  	<!-- <th>上传老师</th> -->
			  	<th>课件名称</th>
			  	<th>上传日期</th>
			  	<th>操作</th>
		  	</tr>
	  	</thead>
	  	<tbody>
	  	<{foreach from=$courses.result item=item}>
		  	<tr>
		  		<td class="center"><{$item['school_name']}></td>
	  			<td class="center"><{$item['class_name']}></td>
	  			<!-- <td class="center"><{$item['teacher_id']}></td> -->
	  			<td class="center"><{$item['name']}></td>
		  		<td class="center"><{$item['add_time']|date_format:'%Y-%m-%d %H:%M:%S'}></td>
		  		<td class="center">
					<a class="layui-btn layui-btn-primary layui-btn-small delete_data" href="/courseware/delete/<{$item['id']}>"><i class="layui-icon"></i></a>
				</td>
		  	</tr>
	  	<{/foreach}>
	  	<{if $courses|count eq 0}>
	  		<tr>
		  		<td class="center" style=" height:120px; text-align:center;line-height:120px;" colspan="5">
					赞无数据！
				</td>
		  	</tr>
	  	<{/if}>
  		</tbody>
  	</table>    
</form>
<div class="layui-box layui-laypage layui-laypage-default">
	<{$pagination}>
</div>
<{include file="public_html/footer.html"}>